#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2024/11/19 15:01
# @Author : XXX
# @Site : 
# @File : action_caiji_class.py
# @Software: PyCharm
class action_caiji:
    '''
    返回的值中，第一个是dryfan，另外一个是cduValve1
    '''
    def __init__(self, dryFan_action_space, cduValve1_action_space):
        self.all_action_space = [(dryFan1, dryFan2, dryFan3, dryFan4, dryFan5, cduValve1)
                            # for dryValve in [0, 100]
                            for dryFan1 in dryFan_action_space[0]
                            for dryFan2 in dryFan_action_space[1]
                            for dryFan3 in dryFan_action_space[2]
                            for dryFan4 in dryFan_action_space[3]
                            for dryFan5 in dryFan_action_space[4]
                            for cduValve1 in cduValve1_action_space]
        self.save_index = 0


    def choose_action(self):
        if self.save_index < len(self.all_action_space)-1:

            return_action = self.all_action_space[self.save_index]
            self.save_index += 1
        else:

            return_action = self.all_action_space[self.save_index]
            self.save_index = 0
        return  return_action